
define(['jquery', 'httpModule'], function(jquery, httpModule) {
  var that = {};
  var $node;

  var test = function() {
    console.log('test');
    // $node.find()
  };

  // 初始化获取dom
  var parseDOM = function(node) {
    $node = node;
    console.log('parseDOM');
    console.log('$node', $node);
  };

  // 绑定向外暴露的方法
  var bindListener = function() {
    console.log('bindListener');
    that.test = test;
  };

  // 初始化时执行的函数
  var initPlugins = function() {
    console.log('initPlugins');
  };

  var init = function(node) {
    console.log('testModule init');
    console.log('httpModule', httpModule);
    parseDOM(node);
    bindListener();
    initPlugins();
  };

  that.parseDOM = parseDOM;
  that.bindListener = bindListener;
  that.initPlugins = initPlugins;
  that.init = init;
  return that;
});


